import { Component, OnInit } from '@angular/core';
import { CookieService } from 'ngx-cookie-service';

@Component({
  selector: 'app-gateway',
  templateUrl: './gateway.component.html',
  styleUrls: ['./gateway.component.css']
})
export class GatewayComponent implements OnInit {

  isPC:boolean;
  userAgent:any;

  constructor(private cookieService: CookieService) { }

  ngOnInit(): void {
    this.userAgent = window.navigator.userAgent;
    this.isPC = this.checkUserAgent(this.userAgent);
    console.log(this.isPC); 
  }

  

  checkUserAgent(userAgent){
    if(userAgent.indexOf("Phone")>0){
      return false
    }
    if(userAgent.indexOf("Android")>0){
      return false
    }
    if(userAgent.indexOf("BlackBerry")>0){
      return false
    }
    if(userAgent.indexOf("SymbianOS")>0){
      return false
    }
    if(userAgent.indexOf("UCWEB")>0){
      return false
    }
    return true;
  }

  

}
